﻿Imports SIAVU.Persistencia
Imports NHibernate

Namespace Dominio

    Public Class InterfaceLegacy

        Public Sub ActualizarTripulantes()
            Dim nhsession As ISession = Nothing
            Try
                nhsession = NHibernateHelper.OpenSession

                Dim objQuery As IQuery
                Dim strQuery As String = String.Empty

                strQuery = "EXEC dbo.ActualizarTripulantes"
                objQuery = nhsession.CreateSQLQuery(strQuery)
                objQuery.ExecuteUpdate()

            Catch ex As Exception
                Throw
            Finally
                nhsession.Close()
            End Try
        End Sub

        Public Sub ActualizarPostas(ByVal Anio As Integer, ByVal Mes As Integer)
            Dim nhsession As ISession = Nothing
            Try
                nhsession = NHibernateHelper.OpenSession

                Dim objQuery As IQuery
                Dim strQuery As String = String.Empty

                strQuery = "EXEC dbo.ActualizarPostas " + Mes.ToString + ", " + Anio.ToString
                objQuery = nhsession.CreateSQLQuery(strQuery)
                objQuery.ExecuteUpdate()

            Catch ex As Exception
                Throw
            Finally
                nhsession.Close()
            End Try
        End Sub

    End Class

End Namespace

